package cn.kgc.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.*;

import java.io.Serializable;
import java.util.Date;

/**
 * @author YC
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "logs_info")
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@SuppressWarnings("all")
public class LogsInfo extends Model<LogsInfo> implements Serializable {

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;


    /**
     * 模块名称
     */
    @TableField(value = "module_name")
    private String moduleName;


    /**
     * 日志描述
     */
    @TableField(value = "description")
    private String description;


    /**
     * 日志类型
     */
    @TableField(value = "log_type")
    private Integer logType;


    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Integer userId;


    /**
     * 执行时间单位毫秒
     */
    @TableField(value = "cost_time")
    private Long costTime;


    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime; //创建时间


    /**
     * 类中的方法
     */
    @TableField(value = "method")
    private String method;


    /**
     * 请求地址
     */
    @TableField(value = "request_url")
    private String requestUrl;


    /**
     * 操作类型
     */
    @TableField(value = "operate_type")
    private Integer operateType;

}
